#include <iostream>
#include "MapCell.h"


using namespace std;


/**
 * Constructor
 * All members are set to "".
 */
MapCell::MapCell()
{
	m_type = "";
	m_content = "";
	m_desc = "";
	m_activate = false;
}


/**
 * Destructor
 *
 */
MapCell::~MapCell()
{
}


/**
 * operator=
 * Overloaded assigment operator.
 * @param const MapCell& mapCellToCopy - which is the Class to copy
 * @return MapCell& - a reference to the copied Class
 *
 */
MapCell& MapCell::operator=(const MapCell& mapCellToCopy)
{
	if (this != &mapCellToCopy)
	{
		m_type = mapCellToCopy.m_type;
		m_content = mapCellToCopy.m_content;
		m_desc = mapCellToCopy.m_desc;
		m_activate = mapCellToCopy.m_activate;
	}
	return *this;
}


/**
 * Activate a Cell
 * @param void
 * @return void
 *
 */
void MapCell::activate()
{
	m_activate = true;
}


/**
 * Deactivate a Cell
 * @param void
 * @return void
 *
 */
void MapCell::deactivate()
{
	m_activate = false;
}


/**
 * Returns activation status
 * @param void
 * @return bool
 *
 */
bool MapCell::isActive()
{
	return m_activate;
}


/**
 * Returns activation status
 * @param void
 * @return bool
 *
 */
void MapCell::setType(std::string type)
{
	m_type = type;
}


/**
 * Returns type of cell
 * @param void
 * @return std::string
 *
 */
std::string	MapCell::getType()
{
	return m_type;
}


/**
 * Set content of cell
 * @param std::string content
 * @return void
 *
 */
void MapCell::setContent(std::string content)
{
	m_content = content;
}


/**
 * Returns content of cell
 * @param void
 * @return std::string
 *
 */
std::string	MapCell::getContent()
{
	return m_content;
}


/**
 * Set description of cell
 * @param std::string desc
 * @return void
 *
 */
void MapCell::setDesc(std::string desc)
{
	m_desc = desc;
}


/**
 * Returns description of cell
 * @param void
 * @return std::string
 *
 */
std::string	MapCell::getDesc()
{
	return m_desc;
}

/**
 * Print cell information
 * @param void
 * @return void
 *
 */
void MapCell::print()
{
	cout << "Type: " << m_type << endl;
	cout << "Content: " <<  m_content << endl;
	cout << "Description: " << m_desc << endl;
	if (m_activate)
	{
		cout << "This cell is active." << endl;
	}
	else
	{
		cout << "This cell is not active." << endl;
	}
}